<template>
  <view class="page">
    <!-- 标题栏 start -->
    <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
      <block slot="content" class="text-black">{{i18n['兑换成功']}}</block>
    </fu-custom>
    <!-- 标题栏 end -->
    <!-- icon start -->
    <view class=" flex justify-center ">
      <image :src="imgBaseUrl + 'integral/success1.png'" mode="widthFix"></image>
    </view>
    <!-- icon end -->
    <!-- 兑换成功 start -->
    <view class="center margin-top text-bold text-lg">
      {{i18n['兑换成功']}}
    </view>
    <!-- 兑换成功 end -->
    <!-- 返回按钮 start -->
    <view class="flex align-center flex-direction success_top justify-between">
      <view class="round  seeOrder flex justify-center align-center" @tap="naToOrder">
        <text>{{i18n['查看订单']}}</text>
      </view>
      <view class="round back-btn  margin-top   flex justify-center align-center" @tap="navTo">
        <text>{{i18n['返回积分商城']}}</text>
      </view>
    </view>

  </view>
</template>

<script>
  export default {
    data() {
      return {
        order_sn: '', //订单编号
      };
    },
    onLoad(options) {
      this.order_sn = options.order_sn
    },
    methods: {
      /**
       * @description  订单详情
       */
      naToOrder() {
        uni.redirectTo({
          url: '/pages/integral/myintegral/integral-exchange-record/index?order_sn=' + this.order_sn +
            '&status=1&order_type=12'
        });
      },
      /**
       * @description  后退两步
       */
      navTo() {
        // uni.navigateBack({
        //   delta: 2
        // })
        uni.redirectTo({
          url: '/pages/integral/integralgoods/integral-goods-list/index'
        });
      }
    }
  }
</script>

<style lang="scss" scoped>
  // 背景主题 start
  .page {
    height: 100vh;
    background-color: #FFFFFF;
  }

  .bg-theme {
    background: $bgtheme;
    color: #fff;
  }

  //  icon start
  image {
    margin-top: 56rpx;
    height: 180rpx;
    width: 250rpx;
  }

  //icon  end
  //兑换成功 start
  .success-desc {
    margin-top: 56rpx;
    width: 152rpx;
    height: 53rpx;
    font-family: PingFang SC;
    color: #2F3742;
    opacity: 1;
  }

  .success_top{
      margin-top: 80rpx !important;

  }
  //兑换成功 end
  .bottom-color {

    width: 280rpx;
    height: 72rpx;
    background: linear-gradient(90deg, #FF6530 0%, #FA2033 100%);
    opacity: 1;
    border-radius: 36px;
    font-size: 28rpx;
    font-weight: 500;
    color: #FFFFFF;

  }

  //查看订单 start
  .seeOrder {
    width: 280rpx;
    height: 72rpx;
    background: #F6F6F6;
    opacity: 1;
    border-radius: 36rpx;
    font-size: 28rpx;
    color: #333333;
  }
  .back-btn{
	  width: 280rpx;
	  height: 72rpx;
	  // border: 1rpx solid #333;
	  background: $theme;
	  // border: 1px solid #BFBFBF;
	  color: #ffffff;
  }

  //查看订单 end
</style>
